home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 1
/
Nebula One.iso
/
Utilities
/
Workspace
/
WrapperInspector
/
Source
/
ImageSubInspector.m
< prev
next >
Wrap
Text File
|
1995-06-12
|
2KB
|
68 lines
//----------------------------------------------------------------------------------------------------
//
// ImageSubInspector
//
// Inherits From: DefaultSubInspector
//
// Declared In: ImageSubInspector.h
//
// Disclaimer
//
// You may freely copy, distribute and reuse this software and its
// associated documentation. I disclaim any warranty of any kind,
// expressed or implied, as to its fitness for any particular use.
//
//----------------------------------------------------------------------------------------------------
#import "ImageSubInspector.h"
#import "ImageView.h"
#import <appkit/appkit.h>
@implementation ImageSubInspector
static id _SELF = nil;
//----------------------------------------------------------------------------------------------------
// Initialization and Free Methods
//----------------------------------------------------------------------------------------------------
+ new
{
// Only allow one instance...
if (_SELF) return _SELF;
_SELF = self = [super new];
return _SELF;
}
//----------------------------------------------------------------------------------------------------
// Inspection Methods
//----------------------------------------------------------------------------------------------------
- inspect: (STR) path
{
id image;
if (! path) return self;
image = [[NXImage alloc] initFromFile: path];
if (! image) return [self inspectionError: path];
[imageView image: image];
[imageView display];
[image free];
return self;
}
//----------------------------------------------------------------------------------------------------
// Accessing Inspection View
//----------------------------------------------------------------------------------------------------
- clearInspectorView
{
// Clear view...
[imageView image: nil];
[imageView display];
return self;
}
@end